package util;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;

public class DefineValue {
	static private  List<String> list_date = new ArrayList<String>();
	static private  List<String> list_month = new ArrayList<String>();
	static private  List<String> list_month_number = new ArrayList<String>();
	static private  List<String> list_year = new ArrayList<String>();
	@SuppressWarnings("unused")
	static private  List<String> list_host = new ArrayList<String>();
	@SuppressWarnings("unused")
	static private  List<String> list_client = new ArrayList<String>();
	@SuppressWarnings("unused")
	static private  HashMap<String,String> hm_host = new HashMap<String, String>();
	static private  List<String> list_maintype = new ArrayList<String>();
	static private  List<String> list_subtype = new ArrayList<String>();
	
	public static List<String> getList_date(){
		list_date = new ArrayList<String>();
		for(int i=1;i<=31;i++){
			String str = (i<10)?"0"+i:""+i;
			str = ""+i;
			list_date.add(i-1,str);
			//list_date.ad
		}
		return list_date;
	}
	
	public static List<String> getList_month(){
		list_month = new ArrayList<String>();
		for(int i=0;i<12;i++){
			String []months = getMonth();
			String str = months[i];
			list_month.add(i,str);
		}
		return list_month;
	}
	
	public static List<String> getList_month_number(){
		list_month_number = new ArrayList<String>();
		for(int i=0;i<12;i++){
			String str = ((i+1)<10)?"0"+(i+1):""+(i+1);
			list_month_number.add(i,str);
		}
		return list_month_number;
	}

	@SuppressWarnings("unused")
	public static List<String> getList_year(){
		
		Calendar cal = Calendar.getInstance(Locale.UK);
		list_year = new ArrayList<String>();
		int this_year =cal.get(Calendar.YEAR);
		int i=0;
    	for(int y =2008;y<=this_year;y++){
    		list_year.add(""+y);
    		i++;
    	}
		return list_year;
	}
	
	public static String[] getMonth(){
		String []months =  { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "Novemeber", "December"};
		return months;
	}
	
	public static String[] getMonth2(){
		String []months =  { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
		return months;
	}
	
	public static String[] getMainType_Show(){
		String []maintype =  { "Please select maintype","stationary", "temporary"};
		return maintype;
	}
	
	public static String[] getSubType_Show(){
		String []subtype =  { "Please select subtype","fishery good", "irrigation channels", "stagnant water","stream water", "rice field", "construction area","ponds / lake", "others"};
		return subtype;
	}
	
	public static List<String> getList_MainType_Show(){
		list_maintype = new ArrayList<String>();
		String []maintype = getMainType_Show();
		for(int i=0;i<maintype.length;i++){
			String str = maintype[i];
			list_maintype.add(i,str);
		}
		return list_maintype;
	}
	
	public static List<String> getList_SubType_Show(){
		list_subtype = new ArrayList<String>();
		String []subtype = getSubType_Show();
		for(int i=0;i<subtype.length;i++){
			String str = subtype[i];
			list_subtype.add(i,str);
		}
		return list_subtype;
	}
	
	public static String[] getMainType_ID(){
		String []maintype =  { "0","1", "2"};
		return maintype;
	}
	
	public static String[] getSubType_ID(){
		String []subtype =  { "0","1", "2", "3","4", "5", "6","7", "8"};
		return subtype;
	}
	
	public static List<String> getList_MainType_ID(){
		list_maintype = new ArrayList<String>();
		String []maintype = getMainType_ID();
		for(int i=0;i<maintype.length;i++){
			String str = maintype[i];
			list_maintype.add(i,str);
		}
		return list_maintype;
	}
	
	public static List<String> getList_SubType_ID(){
		list_subtype = new ArrayList<String>();
		String []subtype = getSubType_ID();
		for(int i=0;i<subtype.length;i++){
			String str = subtype[i];
			list_subtype.add(i,str);
		}
		return list_subtype;
	}
	
	

}
